package com.zk.entity;

import lombok.Data;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;

@Data
@Document("order") //设置文档所在的集合
public class MongoDBOrderDetail implements Serializable {
    //类别，值为“产品”或“设备”
    private String category;
    //产品或设备ID
    private int product_id;
    //购买数量
    private int num;
    //下单时单价
    private double price;

    public MongoDBOrderDetail(String category, int product_id, int num, double price) {
        this.category = category;
        this.product_id = product_id;
        this.num = num;
        this.price = price;
    }

}
